package com.material.vtool.mapper;

import com.material.vtool.entity.BUserInfoEntity;
import com.material.vtool.entity.combinedEntity.CombinedCommonArticleEntity;
import com.material.vtool.entity.combinedEntity.CombinedUserDownloadMaterialEntity;
import com.material.vtool.entity.combinedEntity.CombinedUserShareMaterialEntity;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserInfoMapper {
    BUserInfoEntity getUserInfoByUserId(String userId);

    int updateUserInfo(BUserInfoEntity entity);

    String getUserOpenId(int userId);

    Integer getUserIdByOpenId(String openId);

    /**
     * 添加用户信息
     * @param entity
     * @return
     */
    int addUserInfo(BUserInfoEntity entity);

    int modifyWxUserInfo(BUserInfoEntity entity);

    Integer increaseCollectCount(Integer userId);

    Integer increaseDownloadCount(Integer userId);

    Integer increaseShareCount(Integer userId);

    List<CombinedUserShareMaterialEntity> getUserShareList(Integer userId);

    Integer getUserShareListTotal(Integer userId);

    List<CombinedUserDownloadMaterialEntity> getUserDownloadList(Integer userId);

    Integer getUserDownloadListTotal(Integer userId);
}
